import request from '@/utils/request'

// 查询电商频道列表
export function listChannel(query) {
  return request({
    url: '/app/goodsChannel/list',
    method: 'get',
    params: query
  })
}

// 查询电商频道列表
export function listChannel1(query) {
  return request({
    url: '/app/goodsChannel/list1',
    method: 'get',
    params: query
  })
}

// 查询电商频道详细
export function getChannel(goodsChannelId) {
  return request({
    url: '/app/goodsChannel/' + goodsChannelId,
    method: 'get'
  })
}

// 新增电商频道
export function addChannel(data) {
  return request({
    url: '/app/goodsChannel',
    method: 'post',
    data: data
  })
}

// 修改电商频道
export function updateChannel(data) {
  return request({
    url: '/app/goodsChannel',
    method: 'put',
    data: data
  })
}

// 删除电商频道
export function delChannel(goodsChannelId) {
  return request({
    url: '/app/goodsChannel/' + goodsChannelId,
    method: 'delete'
  })
}

// 导出电商频道
export function exportChannel(query) {
  return request({
    url: '/app/goodsChannel/export',
    method: 'get',
    params: query
  })
}
